import Vapor
import Fluent

final class ReferenceText: Model, Content {
    static let schema: String = "referencetext"
    
    @ID
    var id:UUID?
    
    @Field(key: "fullText")
    var fullText: String?
    
    @Field(key: "isTestimonial")
    var isTestimonial: Bool
    
    @Field(key: "languageIsoCode")
    var languageIsoCode: String?
    
    @Parent(key: "referenceID")
    var reference: Reference
    
    
    init() {}
    
    init(id: UUID? = nil, fullText: String, isTestimonial: Bool, languageIsoCode: String,
         referenceID: Reference.IDValue) {
        self.id = id
        self.fullText = fullText
        self.isTestimonial = isTestimonial
        self.languageIsoCode = languageIsoCode
        self.$reference.id = referenceID
    }

    
}
